package com.jming.helloworld.repository;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jming.helloworld.model.Company;

@Service
public class CompanyService {
   private final CompanyRepository companyRepository;

    @Autowired
    public CompanyService(CompanyRepository companyRepository) {
        this.companyRepository = companyRepository;
    }

    public List<Company> getAllCompanys() {
        return companyRepository.findAll();
    }

    // 添加其他业务逻辑方法...  
}